<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
</head>
<body>
<a th:href="@{/user/toadd}"><input type="button" value="添加"></a>
<table border="1">
    <tr>
        <td>ID</td>
        <td>姓名</td>
        <td>年龄</td>
        <td>密码</td>
        <td>地址</td>
        <td>操作</td>
    </tr>
    <tr th:each="u:${user}">
        <td th:text="${u.id}"></td>
        <td th:text="${u.name}"></td>
        <td th:text="${u.age}"></td>
        <td th:text="${u.pwd}"></td>
        <td th:text="${u.address}"></td>
       <td>
        <a th:href="@{/user/toupdate(id=${u.id})}">修改</a>
        <a th:href="@{/user/delete(id=${u.id})}">删除</a>
       </td>
    </tr>
</table>
</body>
</html>